package cn.edu.scau.cmi.ema.service.base;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;
/*
- CmiProperties封装所有基础属性，在Properties文件中配置
- */
@Service
@PropertySource(value = { "classpath:ema-project.properties" })
public class CmiProjectProperty {
	//	几个需要使用的文件夹路径
	@Value("${domainPackageName}")
	protected String domainPackageName;

	@Value("${servicePackageName}")
	protected String servicePackageName;

	@Value("${daoPackageName}")
	protected String daoPackageName;


	@Value("${excelUploadDirectory}")
	protected String excelUploadDirectory;
	@Value("${excelImportedDirectory}")
	protected String excelImportedDirectory;

	@Value("${imageUploadDirectory}")
	protected String imageUploadDirectory;
	@Value("${imageAdultDirectory}")
	protected String imageAdultDirectory;
	@Value("${imageUnqualifiedDirectory}")
	protected String imageUnqualifiedDirectory;

	@Value("${videoUploadDirectory}")
	protected String videoUploadDirectory;
	@Value("${videoAdultDirectory}")
	protected String videoAdultDirectory;
	@Value("${videoUnqualifiedDirectory}")
	protected String videoUnqualifiedDirectory;

	@Value("${eventUploadDirectory}")
	protected String eventUploadDirectory;
	@Value("${eventAdultDirectory}")
	protected String eventAdultDirectory;

	@Value("${crawlerDirectory}")
	protected String crawlerDirectory;
	@Value("${crawlerAdulterDirectory}")
	protected String crawlerAdulterDirectory;

	@Value("${standardUploaDirectory}")
	protected String standardUploaDirectory;


	//	不同类型的食物的根id
	@Value("${ema.foodtype.agriculturalProductRootId}")
	protected int agriculturalProductRootId;
	@Value("${ema.foodtype.meatRootId}")
	protected int meatRootId;
	@Value("${ema.foodtype.aquaticProductRootId}")
	protected int aquaticProductRootId;
	@Value("${ema.foodtype.dairyProcuseRootId}")
	protected int dairyProcuseRootId;
	@Value("${ema.foodtype.grainAndOilRootId}")
	protected int grainAndOilRootId;
	@Value("${ema.foodtype.otherFoodTypeRootId}")
	protected int otherFoodTypeRootId;
	@Value("${ema.foodtype.processedRootId}")
	protected int processedRootId;

	//	不同类型的食物的id集合
	@Value("#{'${ema-meat}'.split(',')}")
	protected Set<Integer> meatIdSet;

	@Value("#{'${ema-aquatic}'.split(',')}")
	protected Set<Integer> aquaticIdSet;

	@Value("#{'${ema-milk}'.split(',')}")
	protected Set<Integer> milkIdSet;

	@Value("#{'${ema-other}'.split(',')}")
	protected Set<Integer> otherIdSet;

	@Value("#{'${ema-agriculturalProduct}'.split(',')}")
	protected Set<Integer> agriculturalProductIdSet;

	@Value("#{'${ema-grainAndOil}'.split(',')}")
	protected Set<Integer> grainAndOilIdSet;

	@Value("#{'${ema-oil}'.split(',')}")
	protected Set<Integer> oilIdSet;

	@Value("#{'${ema-processed}'.split(',')}")
	protected Set<Integer> processedIdSet;


	@Value("#{'${mainRootFoodtypeIDs}'.split(',')}")
	protected List<Integer> mainRootFoodtypeIDs;
	@Value("#{'${mainRootAdultertypeIDs}'.split(',')}")
	protected List<Integer> mainRootAdultertypeIDs;

	//	不同食物掺假类型的根Id
	@Value("${ema.adultertype.replaceAdultertypeRootId}")
	protected int replaceAdultertypeRootId;
	@Value("${ema.adultertype.dilutionAdultertypeRootId}")
	protected int dilutionAdultertypeRootId;

	@Value("${ema.adultertype.enhanceAdultertypeRootId}")
	protected int enhanceAdultertypeRootId;
	@Value("${ema.adultertype.labelfraudAdultertypeRootId}")
	protected int labelfraudAdultertypeRootId;

	@Value("${ema.adultertype.overuseAdultertypeRootId}")
	protected int overuseAdultertypeRootId;
	@Value("${ema.adultertype.illegaladditionAdultertypeRootId}")
	protected int illegaladditionAdultertypeRootId;

//	考虑使用表达式直接获取物理路径
	@Value("${samr.directory}")
	protected String samrDirectory;

	@Value("${samr.oringalFile}")
	protected String samrOringalFile;

	@Value("${samr.qualifyDetect}")
	protected String samrQualifyDetect;

	@Value("${samr.nonQualifyDetect}")
	protected String samrNonQualifyDetect;

	@Value("${samr.importedDetect}")
	protected String samrImportedDetect;

	@Value("${samr.nonImportDetect}")
	protected String samrNonImportDetect;


//	@Value("${crawlerdetect.brand.length}")
//	protected String crawlerdetectBrandLength;
//






}
